package org.example.lazy;

import jakarta.annotation.PostConstruct;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Lazy
//@Component
public class LazyBean {

    public LazyBean() {
        System.out.println("LazyBean被实例化了");
    }

    //@PostConstruct
    public void init(){
        System.out.println("LazyBean被初始！");
    }

    public void doSomething() {
        System.out.println("LazyBean的方法被调用了");
    }
}
